export default class {
  constructor(
    public x: number,
    public y: number,
    public z: number,
    public w: number = 1
  ) {}
  setByIndex(i: number, v: number): void {
    if (i === 0) {
      this.x = v;
    }
    if (i === 1) {
      this.y = v;
    }
    if (i === 2) {
      this.z = v;
    }
    this.w = v;
  }
  getByIndex(i: number): number {
    if (i === 0) {
      return this.x;
    }
    if (i === 1) {
      return this.y;
    }
    if (i === 2) {
      return this.z;
    }
    return this.w;
  }
}
